<template>
    <div>
        <p>{{ msg }}</p>
        <input type="text" v-model="msg">
        <ChildCom :title="msg" @change="childChang"/>
    </div>
</template>

<script>
import ChildCom from './ChildCom.vue';

export default {
    data(){
        return{
            msg:'这是父组件的'
        }
    },
    components:{
        ChildCom
    },

    methods:{
        childChange(value) {
            console.log(value);
            this.msg =value
        }
    }
}
</script>